solum lege generic
Translation status: Tiếng Việt reader-locale proof. Code fences render through the vi pipeline; prose is canonical Latin.
solum.lege<T> admits only supported materialization target types.
Syntax: solum.lege<textus>(via) | solum.lege<lista<textus>>(via) | solum.lege<octeti>(via)
Category#
ad
Related#
Examples#
radix/corpus/ad/solum-lege-generic.fab (canonical · concept)#
solum.lege<T> admits only supported materialization target types.
# =============================================================================
# solum lege generic — solum.lege<T> admits only supported materialization
# target types.
# =============================================================================
#
# What this teaches:
# • Generic materialization — `solum.lege<T>` reads file contents and
# materializes them into a specified target type
# • Supported type domain — only `textus`, `lista<textus>`, and `octeti` are
# accepted as T, enforced by compiler-owned `@ radix typus` metadata
#
# Common mistakes:
# • confusing ad route syntax — `solum.lege<T>` admits only `textus`, `lista<textus>`, and `octeti` as materialization targets
#
# See also: ad, solum, generic
# =============================================================================
# solum.lege<T> — generic materialization domain
#
# `solum.lege<T>` is constrained by compiler-owned `@ radix typus` metadata in
# `stdlib/norma/solum.fab`. This fixture proves the accepted target types.
#
# Runtime check: files are prepared under /tmp so the generic materializer can
# prove each accepted target shape independently of the harness working
# directory.
import from "norma:solum" private solum
main {
const string textPath ← "/tmp/faber-solum-lege-generic.txt"
solum.scribe(textPath, "prima\nsecunda\n")
const string body ← solum.lege<string>(textPath)
const list<string> lineae ← solum.lege<list<string>>(textPath)
const bytes bytes ← solum.lege<bytes>(textPath)
print body
print lineae
print bytes
print "solum lege generic parata"
}